﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Boco.CommonLib
{
    public static class IListExtensions
    {
        /// <summary>
        /// IList元素字符串拼接
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="list"></param>
        /// <returns></returns>
        public static string ToListString<T>(this List<T> list)
        {
            StringBuilder sb = new StringBuilder();
            foreach (var item in list)
            {
                sb.Append(item.ToString() + ";");
            }
            return sb.ToString();
        }
    }
}
